<?php echo $this->fetch('header.html'); ?>
<script type="text/javascript" src="<?php echo $this->res_base . "/" . 'js/jquery.vtip.js'; ?>" charset="utf-8"></script>
<script type="text/javascript">
$(function(){
    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd',changeMonth: true, changeYear: true});
    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd',changeMonth: true, changeYear: true});
    $('.checkitem').attr('checked', false);//用于删除时返回复选框全部取消
});
</script>
<style type="text/css">
.width_nowrap {width:140px;height:18px;line-height:18px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
</style>
<div id="rightTop">
  <ul class="subnav">
    <li><a class="btn0" href="index.php?app=kd_kehu_no">号码使用记录</a></li>
  </ul>
</div>
<div class="mrightTop">
    <div class="fontl">
<form method="get">
 <div class="left">
    <input type="hidden" name="app" value="kd_kehu_no" />
    状态：<select name="status">
	<option value="-1">所有记录</option>
	<option value="0" <?php if ($_GET['status'] == '0'): ?>selected="selected"<?php endif; ?>>未使用</option>
    <option value="1" <?php if ($_GET['status'] == '1'): ?>selected="selected"<?php endif; ?>>已使用</option>
	</select>&nbsp;&nbsp;
    入仓号:<input name="zhudanNo" type="text" class="queryInput" style="width:80px" value="<?php echo htmlspecialchars($_GET['zhudanNo']); ?>"/>&nbsp;&nbsp;
    包裹号:<input name="baoguoNo" type="text" class="queryInput" style="width:100px" value="<?php echo htmlspecialchars($_GET['baoguoNo']); ?>"/>&nbsp;&nbsp;
    报关号:<input name="baoguanNo" type="text" class="queryInput" style="width:150px" value="<?php echo htmlspecialchars($_GET['baoguanNo']); ?>"/>&nbsp;&nbsp;
    添加时间：<input type="text" value="<?php echo $_GET['add_time_from']; ?>" id="add_time_from" name="add_time_from" class="pick_date" /> 至
    <input type="text" value="<?php echo $_GET['add_time_to']; ?>" id="add_time_to" name="add_time_to" class="pick_date" />
    <select name="pagenum">
      <option value="20" <?php if ($this->_var['pagenum'] == 20): ?>selected<?php endif; ?>>每页20条</option>
      <option value="50" <?php if ($this->_var['pagenum'] == 50): ?>selected<?php endif; ?>>每页50条</option>
      <option value="100" <?php if ($this->_var['pagenum'] == 100): ?>selected<?php endif; ?>>每页100条</option>
      <option value="150" <?php if ($this->_var['pagenum'] == 150): ?>selected<?php endif; ?>>每页150条</option>
      <option value="200" <?php if ($this->_var['pagenum'] == 200): ?>selected<?php endif; ?>>每页200条</option>
   </select>
    <input type="submit" class="formbtn" value="查询" />
</div>
</form>
    </div>
    <div class="fontr"><?php echo $this->fetch('page.top.html'); ?></div>
</div>

<form action="" method="post" id="form_post" target="_blank">
<div class="tdare">
<table width="100%" cellspacing="0" class="dataTable">
    <tr class="tatr1">
      <td width="20" class="firstCell"><input type="checkbox" class="checkall" /></td>
        <td><span ectype="order_by" fieldname="no_id">编号</span></td>
        <td>入仓号</td>
        <td>包裹货号</td>
        <td>报关单号</td>
        <td>状态</td>
        <td><span ectype="order_by" fieldname="addtime">添加时间</span></td>        
        <td>所属运单</td>
    </tr>
    <?php $_from = $this->_var['lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['list']):
?>
    <tr class="tatr2">
      <td class="firstCell"><input type="checkbox" class="checkitem" value="<?php echo $this->_var['list']['no_id']; ?>" /></td>
        <td class="left_style"><?php echo htmlspecialchars($this->_var['list']['no_id']); ?></td>
        <td><?php echo $this->_var['list']['zhudanNo']; ?></td>
        <td><?php echo $this->_var['list']['baoguoNo']; ?></td>
        <td><?php echo $this->_var['list']['baoguanNo']; ?></td>
        <td><?php if ($this->_var['list']['status'] == '0'): ?><font color="#009966">未使用</font><?php else: ?><font color="#f00">已使用</font><?php endif; ?></td>
        <td><?php echo local_date("Y-m-d H:i:s",$this->_var['list']['addtime']); ?></td>
        <td><?php if ($this->_var['list']['order_id']): ?><a href="index.php?app=kd_order&order_id=<?php echo $this->_var['list']['order_id']; ?>" target="_blank">查看</a><?php else: ?>-<?php endif; ?></td>
  </tr>
  <?php endforeach; else: ?>
</table>
<table width="100%" cellspacing="0" class="dataTable">
  <tr bgcolor="#FFFFFF">
    <td style="padding:8px; color:#F00; text-align:center; font-size:14px;">没有符合条件的记录</td>
  </tr>
  <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
</table>
<div>
<?php if ($this->_var['lists']): ?>
<div id="dataFuncs">
  <div id="batchAction" class="left paddingT15">
   &nbsp;&nbsp;&nbsp;<label><input type="checkbox" class="checkall" /> 全选</label>&nbsp;&nbsp;
  <input class="formbtn batchButton" type="button" value="删除" name="id" uri="index.php?app=kd_kehu_no&act=drop" presubmit="confirm('确定要删除当前记录吗，删除后不可找回！');" />  
  </div>
  <div class="pageLinks"><?php echo $this->fetch('page.bottom.html'); ?></div>
<?php endif; ?>

 </div>
  <div class="clear"></div>
</div>
</div>
</form>
<?php echo $this->fetch('footer.html'); ?>